package com.superlc.ssm.modular.sys.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import com.superlc.ssm.modular.sys.model.UserInfo;

/**
 * @author super
 */
@Mapper
public interface UserInfoDao {

    int insert(@Param("userInfo") UserInfo userInfo);

    int insertSelective(@Param("userInfo") UserInfo userInfo);

    int insertList(@Param("userInfos") List<UserInfo> userInfos);

    int update(@Param("userInfo") UserInfo userInfo);

    UserInfo findUserInfoByUserName(@Param("username")String username);

    UserInfo findUserInfoByUid(@Param("uid")Integer uid);

    UserInfo findUserRolePermissionByUserName(@Param("username")String username);

    int addRoleToUserById(@Param("userId")Integer uid,@Param("roleId")Integer roleId);

}
